package com.example.books;



import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageView;

public class BookListActivity extends Activity {
	ImageView iv_back;
	Button btn_book1,btn_book2,btn_book3,btn_book4,btn_book5;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        setContentView(R.layout.activity_book_list);
        iv_back=(ImageView) findViewById(R.id.back);
        iv_back.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent=new Intent(BookListActivity.this,MainActivity.class);
				startActivity(intent);
				BookListActivity.this.finish();
			}
		});
        btn_book1=(Button) findViewById(R.id.know_Button1);
        btn_book1.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				int name=R.raw.jingjimingci;
				String title="1";
				Intent intent = new Intent();
				intent.setClass(BookListActivity.this,
						KnowledgeDetailActivity.class);
				Bundle bundle = new Bundle();
				bundle.putInt("name", name);
				bundle.putString("title", title);
				intent.putExtras(bundle);
				startActivity(intent);
				overridePendingTransition(R.anim.add_go, R.anim.main_go);
				BookListActivity.this.finish();
			}
		});
        btn_book2=(Button) findViewById(R.id.know_Button2);
        btn_book2.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				int name=R.raw.jinrongjichu;
				String title="1";
				Intent intent = new Intent();
				intent.setClass(BookListActivity.this,
						KnowledgeDetailActivity.class);
				Bundle bundle = new Bundle();
				bundle.putInt("name", name);
				bundle.putString("title", title);
				intent.putExtras(bundle);
				startActivity(intent);
				overridePendingTransition(R.anim.add_go, R.anim.main_go);
				BookListActivity.this.finish();
			}
		});
        btn_book3=(Button) findViewById(R.id.know_Button3);
        btn_book3.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				int name=R.raw.shuiwu;
				String title="1";
				Intent intent = new Intent();
				intent.setClass(BookListActivity.this,
						KnowledgeDetailActivity.class);
				Bundle bundle = new Bundle();
				bundle.putInt("name", name);
				bundle.putString("title", title);
				intent.putExtras(bundle);
				startActivity(intent);
				overridePendingTransition(R.anim.add_go, R.anim.main_go);
				BookListActivity.this.finish();
			}
		});
        btn_book4=(Button) findViewById(R.id.know_Button4);
        btn_book4.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				int name=R.raw.xiaofeizhequanyibaohufa;
				String title="1";
				Intent intent = new Intent();
				intent.setClass(BookListActivity.this,
						KnowledgeDetailActivity.class);
				Bundle bundle = new Bundle();
				bundle.putInt("name", name);
				bundle.putString("title", title);
				intent.putExtras(bundle);
				startActivity(intent);
				overridePendingTransition(R.anim.add_go, R.anim.main_go);
				BookListActivity.this.finish();
			}
		});
        btn_book5=(Button) findViewById(R.id.know_Button5);
        btn_book5.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				int name=R.raw.jingjimingci;
				String title="1";
				Intent intent = new Intent();
				intent.setClass(BookListActivity.this,
						KnowledgeDetailActivity.class);
				Bundle bundle = new Bundle();
				bundle.putInt("name", name);
				bundle.putString("title", title);
				intent.putExtras(bundle);
				startActivity(intent);
				overridePendingTransition(R.anim.add_go, R.anim.main_go);
				BookListActivity.this.finish();
			}
		});
        
        }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.book_list, menu);
        return true;
    }
    
}
